import { request } from '@/framework/utils/request-jdz';
import _ from 'lodash-es';
export const getAlarmSampleData = (params) => {
  return request<API.EvaColumnsItem[]>(
    {
      url: '/alarm/sample',
      method: 'get',
      params,
    },
    {
      isMock: true,
    },
  );
};

// 获取升级包管理上传文件
export const postUploadFile = (data) => {
  return request<API.TempColumnsItem[]>(
    {
      url: '/v2/file/',
      method: 'post',
      data,
      timeout: 10 * 60 * 1000,
    },
    {
      isGetDataDirectly: false,
    },
  );
};
export const sampleSearch = (queryParam, queryOpt) => {
  let params = _.pickBy({ ...queryParam, ...queryOpt, status: '' }); // status: '' 代表去掉状态查询参数
  return request(
    {
      url: '/specimens',
      method: 'get',
      params: params,
    },
    {
      isGetDataDirectly: false,
    },
  );
};
//分装和检测修改
export const instance = (data) => {
  return request(
    {
      url: `/strain/instance/${data.id}`,
      method: 'PUT',
      data,
    },
    {
      isGetDataDirectly: false,
    },
  );
};
